#include<iostream>
#include<algorithm>
#include<vector>
#include<map>
#include<queue>
using namespace std;
#define yes cout<<"YES"<<endl
#define no cout<<"NO"<<endl
typedef long long LL;
const int N = 2e5 + 10;
map<LL, int>mp;
LL a[N];
int n, k;
int main()
{
	int t;
	cin >> t;
	while (t--) {
		cin >> n;
		mp.clear();
		LL res2 = 0;
		int flag = 0;
		for (int i = 1; i <= n - 1; i++) {
			cin >> a[i];
			//if (i == 1)continue;
			LL x = a[i] - a[i - 1];
			if (x >= n) {
				res2 = x;
				flag++;
			}
			mp[x]++;
		}
		LL res = 0;
		if (flag >= 2) {
			no;
			continue;
		}
		if (flag) {
			bool flag2 = 0;
			for (int i = 1; i <= n; i++) {
				if (!mp[i])res += i;
				if (mp[i] >= 2)flag2 = 1;
			}
			if (res != res2 || flag2)no;
			else yes;
		}
		else {
			bool flag2 = 0;
			for (int i = 1; i <= n; i++) {
				if (mp[i] >= 2)flag2 = 1;
			}
			if (flag2)no;
			else yes;
		}
		
	}
	return 0;
}